#include <iostream>

using namespace std;

class Draw{
private:
    int height;
public:
    Draw(int height){
        this->height=height;
    }
    void drawTriangle(){
        for (int i=1;i<=height;i++){
            for(int j=1;j<=height-i;j++)
                cout<<" ";
            for(int k=1;k<=(2*i-1);k++)
                cout<<"*";
                cout<<endl;
        }
    }
     void drawRectangle(){
        for (int i=1;i<=height;i++){
                for (int j=1;j <= 3;j++)
                cout << "*";
                cout<<endl;
        }
    }
    void drawsquare(){
        for (int i=1;i<=height;i++){
            for(int k=1;k<=height;k++)
                cout<<"*";
                cout<<endl;
        }
    }
    void drawParallelogram(){
        for (int i=1;i<=height;i++){
           for(int j=1;j<=i;j++)
                cout<<" ";
            for(int k=1;k<=height;k++)
                cout<<"*";
                cout<<endl;
        }
    }
};
int main(){
    Draw draw(5);
    draw.drawTriangle();
    draw.drawRectangle();
    draw.drawsquare();
    draw.drawParallelogram();
    return 0;
}
